<?
$blogposts = getAllPosts();
$posts = new Posts($posts);
foreach ($posts as $post)
{
   echo $post->getTitle();
   echo $post->getAuthor();
   echo $post->getDate();
   echo $post->getContent();
   $comments = new Comments($post->getComments());
   // Dla komentarzy bdzie inny iterator, kod pozostanie taki sam jak dla postw.
   foreach ($comments as $comment)
   {
      echo $comment->getAuthor();
      echo $comment->getContent();
   }
}
?>
